if (lcopt) {
/* let sprintf take care of rounding */
- sprintf(dupe.lat, "%11.6f", waypointp->latitude);
- sprintf(dupe.lon, "%11.6f", waypointp->longitude);
+ sprintf(dupe.lat, "%11.4f", waypointp->latitude);
+ sprintf(dupe.lon, "%11.4f", waypointp->longitude);
+ /* The degrees2ddmm stuff is a feeble attempt to
+ * get everything rounded the same way in a precision
+ * that's "close enough" for determining duplicates.
+ */
+ sprintf(dupe.lat, "%11.3f", degrees2ddmm(waypointp->latitude));
+ sprintf(dupe.lon, "%11.3f", degrees2ddmm(waypointp->longitude));
+
}
crc = get_crc32(&dupe, sizeof(dupe));